package cn.bgs.pojo;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler" })
public class Emp {

  private Integer id;
  private String eName;
  private Integer sal;
  private Integer did;
  //定义一对一关系
  private Dept dept;



  public Dept getDept() {
    return dept;
  }

  public void setDept(Dept dept) {
    this.dept = dept;
  }

  @Override
  public String toString() {
    return "Emp{" +
            "id=" + id +
            ", eName='" + eName + '\'' +
            ", sal=" + sal +
            ", did=" + did +
            '}';
  }

  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String geteName() {
    return eName;
  }

  public void seteName(String eName) {
    this.eName = eName;
  }

  public Integer getSal() {
    return sal;
  }

  public void setSal(Integer sal) {
    this.sal = sal;
  }

  public Integer getDid() {
    return did;
  }

  public void setDid(Integer did) {
    this.did = did;
  }
}